//
// Created by Never on 2019/9/7.
//
#include "Log.h"
namespace GlogWrapper{
    void setLogEnv(bool isLogToConsole, std::string logPath, google::LogSeverity logLevel, vSeverity v)
    {
        FLAGS_log_dir = std::move(logPath);
        FLAGS_logtostderr = isLogToConsole;
        FLAGS_minloglevel = logLevel;
        FLAGS_colorlogtostderr = true;
        FLAGS_v = v;
    }
    void initialLog(char* projectName){
        google::InitGoogleLogging(projectName);
    }

    bool isNeededLog(google::LogSeverity logSeverity, vSeverity v) {
        return logSeverity != google::INFO or VLOG_IS_ON(v);
    }
}
